package com.ruitu.router_module.bean.product;

import java.io.Serializable;

/**
 * Created by Administrator on 2018.07.23.
 * 自己定义的,解析融云的消息json数据
 * <p>
 * 文本信息,消息存储在content
 * {"content":"你好，在吗？","user":{"id":"2821114249922825448","portrait":"https://www.jdh19.com/images/idCard/1532079706579_6508784712716433918.jpg","name":"编号8416"}}
 * {"isFull":false,"imageUri":"http://rongcloud-image.ronghub.com/image_jpeg_***","user":{"id":"","portrait":"https://www.jdh19.com/ima","name":"编号8416"},"localPath":"file:本地路径"}
 * {"user":{"id":"2821114249922825448","portrait":"https:\/\/www.jdh19.com\/images\/idCard\/1532079706579_6508784712716433918.jpg","name":"编号8416"},"duration":2}
 * {"type":"properties","user":{"id":"28","portrait":"8.jpg","name":"编号8416"},"fileUrl":"http://rongcloud-file.","localPath":"file:/c.properties","size":154,"name":"conf.pro"}
 */
public class RongMsgContent implements Serializable {
    private String content;//消息内容(文本消息时有值)
    private String imageUri;//消息内容(图片消息时有值,图片在融云服务器的地址)
    private String duration;//语音消息时长(语音消息不为空)
    private String fileUrl;//文件消息(文件消息发送后的url地址)
    private RongUser user;

    //自定义的融云用户对象
    public static class RongUser implements Serializable {
        private String id;//用户id
        private String portrait;//头像
        private String name;//昵称

        public String getId() {
            return id;
        }

        public void setId(String id) {
            this.id = id;
        }

        public String getPortrait() {
            return portrait;
        }

        public void setPortrait(String portrait) {
            this.portrait = portrait;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public RongUser getUser() {
        return user;
    }

    public void setUser(RongUser user) {
        this.user = user;
    }

    public String getImageUri() {
        return imageUri;
    }

    public void setImageUri(String imageUri) {
        this.imageUri = imageUri;
    }

    public String getDuration() {
        return duration;
    }

    public void setDuration(String duration) {
        this.duration = duration;
    }

    public String getFileUrl() {
        return fileUrl;
    }

    public void setFileUrl(String fileUrl) {
        this.fileUrl = fileUrl;
    }
}
